<?php
$this->breadcrumbs=array(
	'Logs'=>array('index'),
);

$this->menu=array(
//	array('label'=>'List cad_log', 'url'=>array('index')),
//	array('label'=>'Create cad_log', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('cad-log-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php 
// echo CHtml::link('Busca Avançada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php 
// $this->renderPartial('_search',array(
//	'model'=>$model,
//)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'cad-log-grid',
        'pager' => array('cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/gridView.css'),
        'cssFile' => Yii::app()->baseUrl . '/themes/'.Yii::app()->theme->name.'/css/gridView.css',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'cod_user',
		'msg',
		array(
			'class'=>'CButtonColumn',
                        'template' => '{view}',
                        'viewButtonUrl'=>'Yii::app()->createUrl("cad_log/view", array("id" =>$data->id))',
		),
	),
)); ?>
